package com.lc.pianostudent.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2018/2/22.
 */
@HttpInlet(Conn.RESETPASSWORD)
public class PostResetPassword extends BaseAsyPost {

    public String username, sms_code;
    public PostResetPassword(AsyCallBack asyCallBack) {
        super(asyCallBack);
    }

    @Override
    protected PostResetPasswordInfo parser(JSONObject object) throws Exception {
        if (object.optString("code").equals("200")) {

            PostResetPasswordInfo info = new PostResetPasswordInfo();

            info.code = object.optString("code");
            info.message = object.optString("message");


            return info;

        } else {

            TOAST = object.optString("message");

        }

        return null;
    }

    public static class PostResetPasswordInfo {

        public String code, message;

    }

}
